import 'package:flutter/material.dart';
import 'package:flutter/services.dart';


class WrapLayoutPage extends StatelessWidget {
  final SystemUiOverlayStyle _style = SystemUiOverlayStyle(statusBarColor: Colors.transparent);
  @override
  Widget build(BuildContext context) {
    SystemChrome.setSystemUIOverlayStyle(_style);
    // TODO: implement build
    return MaterialApp(
      home: WrapLayoutWidget(),
      theme: ThemeData(primarySwatch: Colors.yellow),
    );
  }
}

class WrapLayoutWidget extends StatefulWidget {
  @override
  State<StatefulWidget> createState() {
    // TODO: implement createState
    return _WrapLayoutPage();
  }
}

class _WrapLayoutPage extends State<StatefulWidget> {

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: AppBar(
        title: Text("WrapLayout Page"),
      ),
      body: Wrap(
        spacing: 10,
        runSpacing: 10,
        children: <Widget>[
          Container(
            width: 150,
            height: 150,
            color: Colors.yellow,
          ),
          Container(
            width: 150,
            height: 150,
            color: Colors.green,
          ),
          Container(
            width: 150,
            height: 150,
            color: Colors.red,
          ),
        ],
      ),
    );
  }
}